A network processor generally controls the flow of packets between a physical transmission medium, such as a physical layer portion of, e.g., an asynchronous transfer mode (ATM) network or synchronous optical network (SONET), and a switch fabric in a router or other type of packet switch. Such routers and switches generally include multiple network processors, e.g., arranged in the form of an array of line or port cards with one or more of the processors associated with each of the cards.
In performing packet processing operations such as routing or switching, the network processor typically must first classify the packet, i.e., determine what type of packet it is and the appropriate routing and switching operations to be applied. Such determinations are typically implemented at least in part by a network processor element commonly referred to as a classifier or classification engine. As part of the above-noted determinations, a determination may be made to drop a packet, e.g., because the packet contains frame errors, is missing a start of packet (SOP) or end of packet (EOP) indicator, is too large, or otherwise exhibits one or more errors.
A significant problem that can often arise in conventional network processors is that packets with errors tend to tie up substantial amounts of valuable classification resources before being dropped. For example, a classifier in a conventional network processor may be responsible for making a decision as to whether a given packet will be dropped. However, in the case of a multi-stage or pipelined classifier, such a classifier is typically configured such that the packet drop decision is not made until after the packet has gone through substantially all of the classification stages or pipelines of the classifier. Known techniques for dropping packets in a network processor are therefore deficient in that they often require excessive classifier resources. This can increase the size, cost and complexity of the network processor.
It is therefore apparent that a need exists for improved techniques for identifying and dropping packets with errors, in a network processor or other type of processor, in a manner which reduces the amount of classification resources consumed in processing the dropped packets.